<%--
  Created by IntelliJ IDEA.
  User: 李林
  Date: 2020/2/21
  Time: 22:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>ERP后台主页</title>
    <meta name="description" content="ERP后台主页">
    <meta name="keywords" content="ERP后台主页">
    <link rel="stylesheet" href="../pages/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../pages/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../pages/plugins/ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="../pages/plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="../pages/plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../pages/css/lcss.css">
    <link rel="stylesheet" href="../pages/css/ali_icon/iconfont.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/pages/plugins/layui/css/layui.css">
    <script src="${pageContext.request.contextPath}/pages/plugins/layui/layui.js "></script>
</head>

<body class="hold-transition skin-yellow-light sidebar-mini">

<div class="wrapper">

    <!-- 页面头部 -->
    <jsp:include page="header.jsp"></jsp:include>
    <!-- 页面头部 /-->

    <!-- 导航侧栏 -->
    <jsp:include page="aside.jsp"></jsp:include>
    <!-- 导航侧栏 /-->

    <!-- 内容区域 -->
    <div class="content-wrapper onjsp">

        <!-- ========================================== -->
        <!-- 内容头部 -->
        <section class="content-header">
            <h1>
                控制面板
                <small>首页</small>
            </h1>
            <ol class="breadcrumb">
                <%--<li><a href="all-admin-index.html"><i class="fa fa-dashboard"></i> 首页</a></li>--%>
            </ol>
        </section>
        <!-- 内容头部 /-->

        <section class="content">

            <div class="row">
                <div class="col-lg-3 col-xs-6">

                    <div class="small-box bg-aqua">
                        <div class="inner">
                            <h3 style="margin-top: 10px">${qiandao}</h3>
                            <p style="margin-top: 20px">签到人数</p>
                        </div>
                        <div class="icon" style="margin-top: 15px">
                            <i class="ion ion-bag"></i>
                        </div>
                        <%--<a href="all-order-manage-list.html" class="small-box-footer">详细 <i class="fa fa-arrow-circle-right"></i></a>--%>
                    </div>
                </div>
                <div class="col-lg-3 col-xs-6">
                    <div class="small-box bg-green">
                        <div class="inner">
                            <h3 style="margin-top: 10px">${profit_today}<sup style="font-size: 20px">%</sup></h3>
                            <p style="margin-top: 20px">当天利润</p>
                        </div>
                        <div class="icon" style="margin-top: 15px">
                            <i class="ion ion-stats-bars"></i>
                        </div>
                        <%--<a href="all-ad-statistics-list.html" class="small-box-footer">详细 <i class="fa fa-arrow-circle-right"></i></a>--%>
                    </div>
                </div>
                <div class="col-lg-3 col-xs-6">
                    <div class="small-box bg-yellow">
                        <div class="inner">
                            <h3 style="margin-top: 10px">${financial_count}</h3>
                            <p style="margin-top: 20px">订单数</p>
                        </div>
                        <div class="icon" style="margin-top: 15px">
                            <i class="ion ion-person-add"></i>
                        </div>
                        <%--<a href="all-member-manage-list.html" class="small-box-footer">详细 <i class="fa fa-arrow-circle-right"></i></a>--%>
                    </div>
                </div>
                <div class="col-lg-3 col-xs-6">
                    <div class="small-box bg-red">
                        <div class="inner">
                            <h3 style="margin-top: 10px">${notice_count}</h3>
                            <p style="margin-top: 20px">待处理消息</p>
                        </div>
                        <div class="icon" style="margin-top: 15px">
                            <i class="ion ion-pie-graph"></i>
                        </div>
                        <%--<a href="all-ad-statistics-list.html" class="small-box-footer">详细 <i class="fa fa-arrow-circle-right"></i></a>--%>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-8" style="padding-right: 0;">
                    <div class="box box-primary Lcontent" style="margin-bottom: 10px;">
                        <div class="box-header with-border">
                            <i class="fa fa-cube"></i>
                            <h3 class="box-title">新闻</h3>
                            <span style="position: absolute;right: 15px;">>><a href="${pageContext.request.contextPath}/admin/news/news.jsp">更多</a></span>
                        </div>
                        <div class="box-body" style="padding-top: 5px;">
                            <!-- 数据表格 -->
                            <div class="table-box">
                                <c:forEach var="news" items="${nownews}">
                                    <div class="Lnews">
                                        <a href="#" class="Lnews-a"><i class="iconfont icon-arrowhead-right"></i>${news.title}</a>
                                        <span><fmt:formatDate value='${news.date}' pattern="yyyy-MM-dd"/></span>
                                    </div>
                                </c:forEach>
                            </div>
                        </div>
                    </div>

                    <div class="box box-success Lcontent" style="margin-bottom: 0;">
                        <div class="box-header with-border">
                            <i class="fa fa-book"></i>
                            <h3 class="box-title">账单</h3>
                            <span style="position: absolute;right: 15px;">>><a href="${pageContext.request.contextPath}/admin/financial/financial.jsp">更多</a></span>
                        </div>

                        <div class="box-body" style="padding-top: 0px;">
                            <%--<div class="table-box" id="demo1">--%>
                            <%--</div>--%>
                            <table lay-filter="demo" id="demo">
                                <thead>
                                <tr>
                                    <th lay-data="{field:'fid', width:80}">账单ID</th>
                                    <th lay-data="{field:'fname', width:210}">账单名称</th>
                                    <th lay-data="{field:'ie', width:90}">收支类别</th>
                                    <th lay-data="{field:'createtime', width:120}">创建时间</th>
                                    <th lay-data="{field:'updatetime', width:160}">更新时间</th>
                                    <th lay-data="{field:'userInfo',width:100}">操作员</th>
                                    <th lay-data="{field:'amount', width:100}">金额</th>
                                    <th lay-data="{field:'kindStr', width:90}">账单种类</th>
                                    <th lay-data="{field:'comment',width:100}">备注</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach items="${nowfinancial}" var="financial" >
                                    <tr>
                                        <td>${financial.fid}</td>
                                        <td>${financial.fname}</td>
                                        <td>${financial.ie}</td>
                                        <td><fmt:formatDate value='${financial.createtime}' pattern="yyyy-MM-dd"/></td>
                                        <td><fmt:formatDate value='${financial.updatetime}' pattern="yyyy-MM-dd hh:ss:mm"/></td>
                                        <td>${financial.userInfo.name}</td>
                                        <td>${financial.amount}</td>
                                        <td>${financial.kindStr}</td>
                                        <td>${financial.comment}</td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="box box-primary" style="height: 636px;margin-bottom: 0;">
                        <div class="box-header with-border">
                            <i class="fa fa-book"></i>
                            <h3 class="box-title">通告</h3>
                            <span style="position: absolute;right: 15px;">>><a href="${pageContext.request.contextPath}/admin/notice/notice.jsp">更多</a></span>
                        </div>
                        <div class="box-body" style="padding-top: 5px;">
                            <%--<div class="table-box" id="demo">--%>
                            <%--</div>--%>
                            <table lay-filter="demo1" id="demo1">
                                <thead>
                                <tr>
                                    <th lay-data="{field:'nid', width:60}">ID</th>
                                    <th lay-data="{field:'content', width:200}">内容</th>
                                    <th lay-data="{field:'date', width:130}">时间</th>
                                    <th lay-data="{field:'status', width:100}">状态</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach items="${nownotice}" var="notice" >
                                    <tr>
                                        <td>${notice.nid}</td>
                                        <td>${notice.content}</td>
                                        <td><fmt:formatDate value='${notice.date}' pattern="yyyy-MM-dd"/></td>
                                        <td>已处理</td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- ========================================== -->

    </div>
    <!-- 内容区域 /-->

    <!-- 底部导航 -->
    <jsp:include page="foot.jsp"></jsp:include>
    <!-- 底部导航 /-->

</div>


<script src="../pages/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="../pages/plugins/jQueryUI/jquery-ui.min.js"></script>
<script src="../pages/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="../pages/plugins/adminLTE/js/app.min.js"></script>
<script src="../pages/plugins/baiduTemplate/baiduTemplate.js"></script>
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<script>
    // 设置激活菜单
    function setSidebarActive(tagUri) {
        var liObj = $("#" + tagUri);
        if (liObj.length > 0) {
            liObj.parent().parent().addClass("active");
            liObj.addClass("active");
        }
    }


    $(document).ready(function() {
        // 激活导航位置
        setSidebarActive("admin-index");
    });
</script>
</body>

</html>
<script>
    layui.use('table', function() {
        var table = layui.table;
        //转换静态表格
        table.init('demo', {
            limit: 5 //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
            //支持所有基础参数
        });
        table.init('demo1', {
            limit: 13 //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
            //支持所有基础参数
        });
    })
</script>